package com.ys.enume.sys;

import java.math.BigDecimal;

public class TsUserInfoEnum {
	
	public enum UserType {
		FUNCTION("职能", "职能"), MANAGE("运管", "运管");
		public String name;
		public String value;

		private UserType(String name, String value) {
			this.name = name;
			this.value = value;
		}
	}
	
	public enum UserSex {
		MALE("男", "男"), FEMALE("女", "女"), OTHER("其他", "其他");
		public String name;
		public String value;

		private UserSex(String name, String value) {
			this.name = name;
			this.value = value;
		}
	}
	
	public enum UserState {
		ON_WORK("在职", "在职"), OFF_WORK("离职", "离职");
		public String name;
		public String value;

		private UserState(String name, String value) {
			this.name = name;
			this.value = value;
		}
	}
	
	public enum Disabled {
		ON("启用", 0), OFF("禁用", 1);
		public String name;
		public Integer value;

		private Disabled(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
	}
	
	public enum UserGrade {
		ONE("小班生", 1, new BigDecimal(1000)),
		TWO("中班生", 2, new BigDecimal(2000)),
		THREE("大班生", 3, new BigDecimal(3000)),
		FOUR("小学生", 4, new BigDecimal(4000)),
		FIVE("初中生", 5, new BigDecimal(5000)),
		SIX("高中生", 6, new BigDecimal(6000)),
		SEVEN("本科生", 7, new BigDecimal(7000)),
		EIGHT("硕士研究生", 8, new BigDecimal(8000)),
		NINE("博士研究生", 9, new BigDecimal(9000)),
		TEN("副教授", 10, new BigDecimal(10000)),
		ELEVEN("教授", 11, new BigDecimal(20000)),
		TWELVE("院士", 12, new BigDecimal(40000));
		public String name;
		public Integer value;
		public BigDecimal point;

		private UserGrade(String name, Integer value, BigDecimal point) {
			this.name = name;
			this.value = value;
			this.point = point;
		}

		public static String getName(Integer value) {
			for (UserGrade e : UserGrade.values()) {
				if (e.value == value) {
					return e.name;
				}
			}
			return "";
		}

		public static BigDecimal getPoint(Integer value) {
			for (UserGrade e : UserGrade.values()) {
				if (e.value == value) {
					return e.point;
				}
			}
			return BigDecimal.ZERO;
		}
	}
}
